package com.example.littleSpider.myapplication.activity;

import android.content.Intent;
import android.view.View;

import com.example.littleSpider.myapplication.R;
import com.example.littleSpider.myapplication.base.BaseActivity;
import com.example.littleSpider.myapplication.myInterfaces.MethodInTitle;
import com.example.littleSpider.myapplication.view.TitleView;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 首页点击赶快进入的页面
 * Created by aduser on 2017/12/9.
 */

public class HurryUpActivity extends BaseActivity implements MethodInTitle {

    @BindView(R.id.title_view)
    TitleView mTitleView;


    @Override
    protected int getLayoutRes() {
        return R.layout.activity_hurry_up;
    }

    @Override
    protected void initView() {
        mTitleView.initMyTitle("赶快-xxx", this, false);
    }

    @Override
    protected void initData() {

    }

    /**
     * 发单和接单的点击事件
     */
    @OnClick({R.id.img_send, R.id.btn_send, R.id.img_recieve, R.id.btn_recieve, R.id.rl_right_one})
    public void clicks(View view) {
        switch (view.getId()) {
//             TODO 登陆验证
            case R.id.img_send:
                startSendActivity();
                break;
            case R.id.btn_send:
                startSendActivity();
                break;
//                TODO 登陆验证
//                TODO 司机认证
            case R.id.img_recieve:
                startRecieveActivity();
                break;
            case R.id.btn_recieve:
                startRecieveActivity();
                break;
            case R.id.rl_right_one:
                startActivity(new Intent(this, HurryupPersonalActivity.class));
                break;
        }
    }

    /**
     * 跳转到发单界面
     */
    public void startSendActivity() {
        Intent intent = new Intent(this, SendActivity.class);
        startActivity(intent);
    }

    /**
     * 跳转到接单界面
     */
    public void startRecieveActivity() {
        boolean tag = true;


        if (tag) {

            startActivity(new Intent(this, PayDepositDialogActivity.class));
//            startActivity(new Intent(this,DriverAuthenticationDialogActivity.class));
//            startActivity(new Intent(this, RecieveActivity.class));
        }


    }

    @Override
    public void setGoBack() {
//        finish();
//        Toasty.success(this, "success").show();
        finish();
    }

    @Override
    public void onRightOne() {

    }

    @Override
    public void onRightTwo() {

    }

    @Override
    public void onTitleText() {

    }
}
